package com.wantupai.translate.activity;

import android.view.View;
import android.widget.TextView;

import com.wantupai.translate.R;
import com.wantupai.translate.base.BaseActivity;
import com.wantupai.translate.utils.CommonUtils;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * @author luxuchang
 * @date 2019/5/7 0007
 * @description
 */
public class TranslateActivity extends BaseActivity {
    @BindView(R.id.tv_context)
    TextView tvContext;
    @BindView(R.id.tv_translate)
    TextView tvTranslate;

    private String result;
    private String content;

    @Override
    public int getLayoutId() {
        return R.layout.activity_translate;
    }

    @Override
    public void initViews() {

    }

    @Override
    public void initListener() {

    }

    @Override
    public void initData() {
        content = getIntent().getStringExtra("data");
        result = getIntent().getStringExtra("trans_result");
        tvContext.setText(content);
        tvTranslate.setText(result);
    }

    @Override
    public void processClick(View v) {

    }

    @OnClick({R.id.btn_copy, R.id.btn_trim, R.id.btn_share,R.id.voice_say})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_copy:
                CommonUtils.copyText(result);
                break;
            case R.id.btn_trim:
                break;
            case R.id.btn_share:
                break;
            case R.id.voice_say:
                break;
        }
    }
}
